<?php

use Ratchet\Server\IoServer;
use Ratchet\WebSocket\WsServer;
use WebSocket\Chat;

require dirname(__DIR__) . '/vendor/autoload.php';
require dirname(__DIR__) . '/WebSocket/Chat.php';

$server = IoServer::factory(
    new WsServer(
        new Chat()
    )
    , 8080
);

$server->run();

/**
 * Running WebSocket:
 * 1) Run Web Socket Server: php matriz-de-sincronizacao/WebSocket/WsServer.php
 */
